import ax from "@/utils/axios";

let baseUrl = "/menu"

export const _selectAllMenusOption = () => {
  return ax.get(baseUrl + "/option_list");
}

export const _getParentMenus = () => {
  return ax.get(baseUrl + "/parent_list");
}
export const _getNodeById = (nodeId) => {
  return ax.get(baseUrl + "/one/" + nodeId);
}
export const _insertNode = (data) => {
  return ax.post(baseUrl + "/add", data)
}

export const _editNode = (data) => {
  return ax.put(baseUrl + "/edit", data)
}

export const _deleteNode = (checked_arr) => {
  return ax.post(baseUrl + "/delete",checked_arr)
}
